@charset "utf-8";

@import "./transition.scss";
@import "./loading.scss";

$base: ".byui";

@mixin scrollbar {
  max-height: 98vh;
  margin-bottom: 0.5vh;
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    background: transparent;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(144, 147, 153, 0.3);
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background-color: rgba(144, 147, 153, 0.3);
  }
}

@mixin base-scrollbar {
  &::-webkit-scrollbar {
    width: 13px;
    height: 13px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.4);
    background-clip: padding-box;
    border: 3px solid transparent;
    border-radius: 7px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.5);
  }

  &::-webkit-scrollbar-track {
    background-color: transparent;
  }

  &::-webkit-scrollbar-track:hover {
    background-color: #f8fafc;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  outline: none;
}

#{$base}-clearfix::after {
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
  content: ".";
}

img {
  object-fit: cover;
}

a {
  color: $base-color-blue;
  text-decoration: none;
  cursor: pointer;
}

html {
  body {
    position: relative;
    height: 100vh;
    padding: 0;
    margin: 0;
    font-family: "Microsoft YaHei";
    font-size: $base-font-size-default;
    font-weight: 400;
    background: #f6f8f9;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;

    @include base-scrollbar;

    svg,
    i {
      &:hover {
        opacity: 0.8;
      }
    }

    /* 文本编辑器开始 */

    .quill-editor {
      border: 1px solid #dcdfe6;

      .ql-toolbar.ql-snow {
        padding: 0;
        text-align: left;
        border: 0;
        border-bottom: 1px solid #dcdfe6;

        .ql-formats {
          margin-right: 0;

          * {
            outline: none;
          }

          & .ql-picker {
            height: auto;
            outline: none;
          }

          .ql-color-picker,
          .ql-align {
            height: 28px;
          }

          .ql-header,
          .ql-size {
            width: 60px;
          }

          .ql-picker.ql-expanded .ql-picker-label {
            border-color: transparent;
          }
        }
      }

      .ql-container {
        height: calc(100% - 50px);
        border: 0;
      }

      .ql-snow .ql-tooltip[data-mode="link"]::before {
        content: "请输入链接地址:";
      }

      .ql-snow .ql-tooltip.ql-editing a.ql-action::after {
        padding-right: 0;
        content: "保存";
        border-right: 0;
      }

      .ql-snow .ql-tooltip[data-mode="video"]::before {
        content: "请输入视频地址:";
      }

      .ql-snow .ql-picker.ql-size .ql-picker-label::before,
      .ql-snow .ql-picker.ql-size .ql-picker-item::before {
        content: "14px";
      }

      .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
      .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
        content: "10px";
      }

      .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
      .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
        content: "18px";
      }

      .ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
      .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
        content: "32px";
      }

      .ql-snow .ql-picker.ql-header .ql-picker-label::before,
      .ql-snow .ql-picker.ql-header .ql-picker-item::before {
        content: "文本";
      }

      .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
      .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
        content: "标题1";
      }

      .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
      .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
        content: "标题2";
      }

      .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
      .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
        content: "标题3";
      }

      .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
      .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
        content: "标题4";
      }

      .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
      .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
        content: "标题5";
      }

      .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
      .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
        content: "标题6";
      }

      .ql-snow .ql-picker.ql-font .ql-picker-label::before,
      .ql-snow .ql-picker.ql-font .ql-picker-item::before {
        content: "标准字体";
      }

      .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
      .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
        content: "衬线字体";
      }

      .ql-snow,
      .ql-picker.ql-font,
      .ql-picker-label[data-value="monospace"]::before,
      .ql-snow,
      .ql-picker.ql-font,
      .ql-picker-item[data-value="monospace"]::before {
        content: "等宽字体";
      }
    }

    /* 文本编辑器结束 */

    /* markdown编辑器开始 */
    .editor-toolbar {
      .no-mobile,
      .fa-question-circle {
        display: none;
      }
    }

    /* markdown编辑器结束 */

    /* 大图展示开始 */
    .el-image-viewer {
      &__close {
        .el-icon-circle-close {
          color: $base-color-white;
        }
      }
    }

    /* 大图展示结束 */

    .app-wrapper {
      .app-main-container {
        @include base-scrollbar;

        > [class*="-container"] {
          padding: 15px;
          background: $base-color-white;
        }
      }
    }

    /* 进度条开始 */
    #nprogress {
      .bar {
        background: $base-color-blue !important;
      }

      .peg {
        box-shadow: 0 0 10px $base-color-blue, 0 0 5px $base-color-blue !important;
      }
    }

    /* 进度条结束 */

    /* 表格开始 */

    .el-table {
      .el-table__body-wrapper {
        @include base-scrollbar;
      }

      th {
        background: #f5f7fa;
      }

      td,
      th {
        position: relative;
        box-sizing: border-box;
        padding: 7.5px 0;
        text-align: center;
        text-overflow: ellipsis;
        vertical-align: middle;

        .cell {
          overflow: hidden;
          font-size: $base-font-size-default;
          font-weight: normal;
          color: #606266;
          text-overflow: ellipsis;
          white-space: nowrap;

          .el-image {
            width: 50px;
            height: 50px;
            border-radius: $base-border-radius;
          }
        }
      }
    }

    /* 表格结束 */

    /* 分页开始 */
    .el-pagination {
      padding: 2px 5px;
      margin: 15px 0 0 0;
      font-weight: normal;
      color: $base-color-black;
      text-align: center;
      white-space: nowrap;
    }

    /* 分页结束 */

    /* 菜单开始 */
    .el-menu.el-menu--popup.el-menu--popup-right-start {
      @include scrollbar;
    }

    .el-menu.el-menu--popup.el-menu--popup-bottom-start {
      @include scrollbar;
    }

    .el-menu--vertical {
      .el-menu-item {
        height: 46px !important;
        line-height: 46px !important;

        &.is-active {
          background-color: $base-menu-background-active !important;
        }
      }
    }

    /* 菜单结束 */

    /* tag开始 */
    .el-tag {
      &--small {
        height: $base-input-height;
        margin-right: 10px;
        line-height: $base-input-height;
        border-radius: $base-border-radius;
      }
    }

    /* tag结束 */

    /* 按钮开始 */
    .el-button--small {
      padding: 8px 20px;
      font-size: $base-font-size-default;
      border-radius: $base-border-radius;

      button:hover::before {
        transform: scaleX(1);
        transform-origin: center;
      }
    }

    /* 按钮结束 */

    /* 弹窗开始 */

    .el-dialog,
    .el-message-box {
      &__body {
        border-top: 1px solid $base-border-color;

        .el-form {
          padding-right: 30px;
        }
      }

      &__footer {
        padding: $base-padding;
        text-align: right;
        border-top: 1px solid $base-border-color;
      }

      &__content {
        padding: 20px 20px 20px 20px;
      }
    }

    /* 弹窗结束 */
    #{$base}-form-main {
      width: $base-form-width;
      margin-right: auto;
      margin-left: auto;
    }

    #{$base}-pull-left {
      float: left;
    }

    #{$base}-pull-right {
      float: right;
    }

    .el-submenu__title i {
      color: $base-color-white;
    }

    .el-menu--horizontal .el-menu-item:not(.is-disabled):hover {
      color: $base-color-white;
      background-color: $base-color-blue;
      outline: 0;
    }

    /* 卡片开始 */
    .el-card {
      margin-bottom: 15px;
      box-shadow: none;

      &:hover {
        box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
      }

      &__header {
        padding: $base-padding;

        & > div > span {
          width: 60%;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }

      &__body {
        padding: $base-padding;
      }
    }

    /* 卡片结束 */

    /* 下拉树样式-----------开始 */
    .select-tree-popper {
      .el-scrollbar {
        .el-scrollbar__view {
          .el-select-dropdown__item {
            height: auto;
            max-height: 274px;
            padding: 0;
            overflow-y: auto;
            line-height: 26px;
          }
        }
      }
    }

    /* 下拉树样式-----------结束 */
  }
}
